//
// Created by Administrator on 2018/3/19 0019.
//

#include <jni.h>
#include <sys/time.h>
#include "com_xzk_utillibary_comman_TimeUtil.h"

JNIEXPORT jlongArray JNICALL Java_com_xzk_utillibary_comman_TimeUtil_currentMicroscoendC
        (JNIEnv * env, jclass jclx){
    jlongArray jArr=env->NewLongArray(2);
    jlong temp[]={0,0};
    struct timeval begin;
    gettimeofday(&begin,NULL);
    temp[0] = begin.tv_sec;
    temp[1]=begin.tv_usec;
    env->SetLongArrayRegion(jArr,0,2,temp);
    return  jArr;
}